home *** CD-ROM | disk | FTP | other *** search
/ Sound Galaxy Audio Applications & Utilities / Sound Galaxy Audio Applications & Utilities.iso / STUP / SPECIFIC.INC < prev   
Encoding:
Text File  |  1994-03-23  |  8.4 KB  |  233 lines

  1. ''--------------------------------------------------------------------
  2. '' Professor MULTIMEDIA CD-specific install functions
  3. '' Copyright (c) 1993 Individual Software, Inc.
  4. ''--------------------------------------------------------------------
  5.  
  6. '' Variable for network installs - "0" = Standalone Version, "1" = Network Version
  7.  
  8.     NETINSTALL% = 0
  9.  
  10. '' Set up product-specific titles, etc.
  11. SUB SetProductTitles STATIC
  12.     SetTitle "Sound Galaxy Setup"      ''Setup Window Title
  13.     PMMAPP$ = "Professor MULTIMEDIA"     ''Text under the icon
  14. END SUB
  15.  
  16.  
  17. FUNCTION InfFile() STATIC AS STRING
  18.     InfFile = "PMM.INF"
  19. END FUNCTION
  20.  
  21.  
  22. FUNCTION MakeInstDir(D$) STATIC AS STRING
  23.  
  24.         S$ = D$ + ":\SG16"
  25.  
  26.     MakeInstDir = S$
  27.  
  28. END FUNCTION
  29.  
  30.  
  31. SUB AddInfSectionNames(BASE$, SOUNDS$, BASEINST$, SOUNDSINST$) STATIC
  32.  
  33.     '' These are the base files we can install
  34.     AddListItem BASE$, "Base Files"
  35.     SetSymbolValue BASEINST$, GetSymbolValue(BASE$)
  36.  
  37.  
  38.     '' By default, we install all the above
  39. ''  SetSymbolValue SOUNDSINST$, GetSymbolValue(SOUNDS$)
  40.  
  41.     '' The user probably doesn't want all these on the HD by default
  42. ''  AddListItem SOUNDS$, "Video Samples"
  43.  
  44. END SUB
  45.  
  46.  
  47. SUB RecalcPath STATIC
  48.     CursorSave% = ShowWaitCursor()
  49.     RecalcOptFiles BASEFILES
  50.     RecalcOptFiles SOUNDFILES
  51.     RestoreCursor CursorSave%
  52. END SUB
  53.  
  54.  
  55. SUB AddOptFiles STATIC
  56.     AddOptFilesToCopyList BASEFILES
  57.     AddOptFilesToCopyList SOUNDFILES
  58. END SUB
  59.  
  60.  
  61. SUB AddOptFilesToCopyList (ftype%) STATIC
  62.  
  63.     IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
  64.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  65.     IF ftype% = BASEFILES THEN
  66.         ''Base files
  67.         l% = GetListLength(BASEINST$)
  68.         FOR i% = 1 TO l% STEP 1
  69.             AddSectionFilesToCopyList GetListItem(BASEINST$, i%), SrcDir$, DEST$
  70.         NEXT i%
  71.  
  72.         AddSectionFilesToCopyList "ToolBook", SrcDir$, DEST$
  73.  
  74.         '' Install Video for Windows runtime
  75.         AddSectionFilesToCopyList "Media Player", MakePath(SrcDir$, "STUP\VFW"), WINDIR$
  76.         AddSectionFilesToCopyList "VFW Runtime", MakePath(SrcDir$, "STUP\VFW"), SYSDIR$
  77.         AddSectionFilesToCopyList "Codecs", MakePath(SrcDir$, "STUP\VFW"), WINDIR$
  78.         AddSectionFilesToCopyList "Cinepak Codec", MakePath(SrcDir$,"STUP\VFW"), SYSDIR$
  79.  
  80. ''--ELSEIF ftype% = SOUNDFILES THEN
  81. ''      l% = GetListLength(SOUNDSINST$)
  82. ''      FOR i% = 1 TO l% STEP 1
  83. ''          AddSectionFilesToCopyList GetListItem(SOUNDSINST$, i%), SrcDir$, DEST$
  84. ''----- NEXT i%
  85.     END IF
  86.     SrcDir$ = ""
  87.     END IF
  88.  
  89. END SUB
  90.  
  91.  
  92. SUB SetDriveStatus STATIC
  93.     FITS% = 0
  94.     drive$ = MID$(DEST$, 1, 1)
  95.     ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
  96.  
  97.     cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
  98.     cost& = cost& + VAL(GetListItem(SOUNDNEEDS$, ndrive%))
  99.  
  100.     free& = GetFreeSpaceForDrive(drive$)
  101.  
  102.     IF cost& > free& THEN
  103.         FITS% = 1
  104.     END IF
  105.     ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
  106.     ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
  107.     ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
  108.  
  109.  
  110. ''  IF drive$ = WINDRIVE$ THEN
  111. ''      ReplaceListItem DRIVETEXT$, 4, ""
  112. ''      ReplaceListItem DRIVETEXT$, 5, ""
  113. ''      ReplaceListItem DRIVETEXT$, 6, ""
  114. ''  ELSE
  115. ''      ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
  116.  
  117. ''      cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
  118. ''      cost& = cost& + VAL(GetListItem(SOUNDNEEDS$, ndrive%))
  119.  
  120. ''      IF cost& = 0 THEN
  121. ''          ReplaceListItem DRIVETEXT$, 4, ""
  122. ''          ReplaceListItem DRIVETEXT$, 5, ""
  123. ''          ReplaceListItem DRIVETEXT$, 6, ""
  124. ''      ELSE
  125. ''          free& = GetFreeSpaceForDrive(WINDRIVE$)
  126. ''          IF cost& > free& THEN
  127. ''              FITS% = 1
  128. ''          END IF
  129. ''          ReplaceListItem DRIVETEXT$, 4, WINDRIVE$ + ":"
  130. ''          ReplaceListItem DRIVETEXT$, 5, STR$(cost& / 1024) + " K"
  131. ''          ReplaceListItem DRIVETEXT$, 6, STR$(free& / 1024) + " K"
  132. ''      END IF
  133. ''  END IF
  134. END SUB
  135.  
  136.  
  137. '' Add billboard dialogs for this app
  138. SUB AddBillboards STATIC
  139.     AddToBillboardList CUIDLL$, BBD1, "FModelessDlgProc", 100
  140.     AddToBillboardList CUIDLL$, BBD6, "FModelessDlgProc", 100
  141. END SUB
  142.  
  143.  
  144. SUB ConfigureApps STATIC
  145.  
  146.     '' This is so Fixer can find where we're installed
  147.     CreateIniKeyValue WININI$, "ProfMultiMedia", "PMM", DEST$+"\PMM", cmoOverwrite
  148.  
  149.     '' This is the name of the group we'll install into
  150.     GROUP$ = "Individual Software"
  151.     GROUP2$ = "SG Audio Apps & Utilities"
  152.  
  153.     '' Configure base applications
  154.     IF GetListItem(CHECKSTATES$, BASEFILES) = "ON" THEN
  155.  
  156. MakeGroup:
  157.     '' Create a group for us...
  158.     CreateProgmanGroup GROUP$, "", cmoNone
  159.     CreateProgmanGroup GROUP2$, "", cmoNone
  160.  
  161.     '' Setup PMM Program
  162. ''--CreateProgmanItem GROUP$, PMMAPP$, MakePath(DEST$,"tbook.exe")+" "+CDDRV$+"mainmenu.tbk", MakePath(DEST$,"PMM.ICO"), cmoOverwrite
  163.     CreateProgmanItem GROUP$, PMMAPP$, MakePath(DEST$+"\PMM\","PMM.EXE"),"" , cmoOverwrite
  164.  
  165.     '' Setup LRNWIN Program
  166.     CreateProgmanItem GROUP$, "Learn Windows", MakePath(DEST$+"\LRNWIN\","LRNWIN.EXE"),"" , cmoOverwrite
  167.  
  168.     '' Setup AZTEC Utilities Program
  169.     CreateProgmanItem GROUP2$, "WinDAT", MakePath(DEST$+"\VOYETRA\WINDAT\","WINDAT.EXE"),"" , cmoOverwrite
  170.     CreateProgmanItem GROUP2$, "Say It", MakePath(DEST$+"\VOYETRA\WINDAT\","SAYIT.EXE"),"" , cmoOverwrite
  171.     CreateProgmanItem GROUP2$, "Audiostation", MakePath(DEST$+"\VOYETRA\WINDAT\","AUDIOSTA.EXE"),"" , cmoOverwrite
  172.     CreateProgmanItem GROUP2$, "MIDI Orchestrator", MakePath(DEST$+"\VOYETRA\WINDAT\","ORCH.EXE"),"" , cmoOverwrite
  173.     CreateProgmanItem GROUP2$, "Audio Calendar", MakePath(DEST$+"\VOYETRA\WINDAT\","CAL.EXE"),"" , cmoOverwrite
  174.     CreateProgmanItem GROUP2$, "Sound Events", MakePath(DEST$+"\VOYETRA\WINDAT\","SNDEVENT.EXE"),"" , cmoOverwrite
  175.     CreateProgmanItem GROUP2$, "Sound Script", MakePath(DEST$+"\VOYETRA\WINDAT\","SSCRIPT.EXE"),"" , cmoOverwrite
  176.     CreateProgmanItem GROUP2$, "VoiceNet", MakePath(DEST$+"\VOYETRA\WINDAT\","VOICENET.EXE"),"" , cmoOverwrite
  177.     CreateProgmanItem GROUP2$, "Windows JukeBox", MakePath(DEST$+"\VOYETRA\JUKEBOX\","WJUKE.EXE"),"" , cmoOverwrite
  178. ''    CreateProgmanItem GROUP2$, "Monologue", MakePath(DEST$+"\MONOLOG\","MONOLOGW.EXE"),"" , cmoOverwrite
  179. ''    CreateProgmanItem GROUP2$, "Dict. Manager", MakePath(DEST$+"\MONOLOG\","DICTMGR.EXE"),"" , cmoOverwrite
  180. ''    CreateProgmanItem GROUP2$, "ComVoice", MakePath(DEST$+"\COMVOICE\","COMVOICE.EXE"),"" , cmoOverwrite
  181.  
  182.  
  183.     '' Setup Video for Windows
  184.     CreateIniKeyValue SYSINI$, "Drivers", "VIDC.MSVC", "msvidc.drv", cmoNone
  185.     CreateIniKeyValue SYSINI$, "Drivers", "VIDC.RT21", "indeo.drv", cmoNone
  186.     CreateIniKeyValue SYSINI$, "mci", "AVIVideo", "mciavi.drv", cmoNone
  187.     CreateIniKeyValue WININI$, "mci extensions", "avi", "AVIVideo", cmoNone
  188.  
  189. ''------------------------------------------------------CinePak
  190.     'This routine should be run whether or not the files are copied.
  191.     'This is because the existence of the files on disk is not a
  192.     'guarantee of correct installation!
  193.  
  194.     'Updating CONTROL.INI and SYSTEM.INI
  195.     CreateIniKeyValue GetWindowsDir() + "control.ini", "Userinstallable.drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
  196.     CreateIniKeyValue GetWindowsDir() + "control.ini", "related.desc", "VIDC.CVID", "", cmoOverwrite
  197.     CreateIniKeyValue GetWindowsDir() + "system.ini",  "drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
  198. ''------------------------------------------------------
  199.  
  200.     '' Hack because the MIDI files have goofs in them...
  201.     CreateIniKeyValue SYSINI$, "mciseq.drv", "disablewarning", "true", cmoNone
  202.  
  203.     res% = Run("regedit.exe /s " + MakePath(WINDIR$, "mplayer.reg"))
  204.     '' res% = Run("profdisp.exe")
  205.  
  206.     END IF
  207.  
  208. END SUB
  209.  
  210.  
  211.  
  212. '' Remove all files and directories...
  213.  
  214. SUB DoUninstall STATIC
  215. ''  res% = sndPlaySound(MakePath(INSTSNDDIR$, "v13.wav"), 3)
  216.     IF IDYES = DoMsgBox("Are you sure you want to remove the NOVA16 programs from your system?", "Aztech", MB_YESNO) THEN
  217.         DEST$ = GetIniKeyString(WININI$, "ProfMultiMedia", "PMM")
  218.  
  219.         IF DEST$ <> "" THEN
  220.             old% = ShowWaitCursor()
  221.  
  222.             RemDirectory DEST$
  223.  
  224.             RestoreCursor old%
  225.  
  226.             i% = DoMsgBox("The NOVA16 programs have been removed.  You can run Setup later to re-install them.", "Aztech", MB_OK)
  227.             END
  228.         ELSE
  229.             i% = DoMsgBox("The NOVA16 programs have are not installed or cannot be found!", "Aztech", MB_OK)
  230.         END IF
  231.     END IF
  232. END SUB
  233.